<?php
session_start( );
?>
<?php
require_once('connections/mysqlDB.php');
?>
<?php 

$dbConn = new mysqli(HOST,USER,PWD,DB);
// get login user regid
$reginfoid=  $_GET['reginfoid'];
//echo "reginfoid = " . $reginfoid;

/* prepare statement */
$dbConn->query("SET NAMES 'utf8'");
echo "<form name=\"form2\" method=\"post\" action=\"modify.php\">";
if ($stmt = $dbConn->prepare("select b.cname, trim(b.first_name), trim(b.last_name) from registration_info b where b.reginfoid= ?  ")) {
    $stmt->bind_param('i', $reginfoid);
    $stmt->execute(); 
	$stmt->bind_result($col1, $col2, $col3);
	while ($stmt->fetch()) {
	//echo "<a href=\"con_registration.php?reginfoid=" . $col1 . "\">" . $col1 . "</a></td>"; 
	echo "Chinese<input type=\"text\" name=\"cname\" value=\"$col1\"><br>";
    echo "<font color=\"#FF0000\">*First Name:</font>";
    echo "<input type=\"text\" name=\"firstname\" value=\"$col2\"><br>";
    echo "<font color=\"#FF0000\">*Last Name:</font> ";
    echo "<input type=\"text\" name=\"lastname\" value=\"$col3\"><br>";
	echo "<input type=\"Submit\" name=\"Submit\" value=\"Update\">";
	//echo  $col1. ' ' . $col2 . ' '. $col3 . ' ' . $col4 . ' ' . $col5 . ' ' .  "<br>";
   }

}
?>

